# pip install flask 或pip install flask -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com


from flask import Flask,jsonify,request
app = Flask(__name__)
# 使通过jsonify返回的中文显示正常，否则显示为ASCII码
app.config["JSON_AS_ASCII"] = False


@app.route('/hello',methods=["GET"])
def hello_world():
    data={'message':'hello world'}
    return jsonify({"code": 200, "msg": data})

if __name__=='__main__':
    app.run()